﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toastinet="using:Toastinet"
    x:Class="Toastinet.WinRT.Sample.ToastinetPortableContent"
    mc:Ignorable="d"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <toastinet:Toastinet x:Name="Toast"
          Title="Toastinet"
          Background="#E67F22"
          Message="{Binding Message, Mode=TwoWay}"
          Image="/toast.png"
          Canvas.ZIndex="1"
          Queued="True"
          VerticalAlignment="Top" >
            <!--<StackPanel Margin="10">
                <TextBlock FontSize="20" Text="- custom content"/>
                <TextBlock FontSize="20" Text="- dynamic height"/>
                <TextBlock FontSize="20" Text="{Binding Message, Mode=TwoWay}"/>
                <Image Source="/toast.png" Height="60"></Image>
            </StackPanel>-->
        </toastinet:Toastinet>

        <toastinet:Toastinet Grid.Row="0"
          x:Name="Toast2"
          Duration="1"
          FontSize="25"
          Padding="50"
          TextHAlignment="Center"
          AnimationType="Vertical"
          Background="#2ecc71"
          Foreground="Black"
          TextWrapping="Wrap"
          Canvas.ZIndex="1"
          VerticalAlignment="Top" />

        <toastinet:Toastinet x:Name="Toast3"
          Duration="1"
          Title="Toastinet"
          Height="50"
          AnimationType="RightToLeft"
          Image="/toast.png"
          Canvas.ZIndex="1"
          VerticalAlignment="Top" />

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Background="#E67F22"
                Margin="0,20" Orientation="Horizontal">
            <Image Source="/toast.png" Height="50" Margin="10,0"></Image>
            <TextBlock Text="Let's Toast with Toastinet" Margin="0" FontSize="18" VerticalAlignment="Center" />
        </StackPanel>

        <Button Background="DimGray" 
                Foreground="White"
                Height="50"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,-10,0,0" Padding="5"
                BorderThickness="1"
                FontSize="14"
                Content="This button is clickable"></Button>
        
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <StackPanel HorizontalAlignment="Center">
                <Button Width="300" Margin="0,0,0,5" Content="basic with bound data" Click="OnBasicToast" />
                <Button Width="300" Margin="0,0,0,5" Content="text wrapping from top" Click="OnBasicToast2" />
                <Button Width="300" Margin="0,0,0,5" Content="animation LeftToLeft" Click="OnL2L" />
                <Button Width="300" Margin="0,0,0,5" Content="animation RightToRight" Click="OnR2R" />
                <Button Width="300" Margin="0,0,0,5" Content="animation LeftToRight" Click="OnL2R" />
                <Button Width="300" Margin="0,0,0,5" Content="toast event" Click="OnEventToast" x:Name="ToastEventBtn" />
                <Button Width="300" Margin="0,0,0,5" Content="fixed width" Click="OnNotStretch" />
            </StackPanel>

            <toastinet:Toastinet x:Name="Toast4"
                  Duration="1"
                  Padding="0"
                  Background="#E67F22"
                  Message="Toasts are now clipped"
                  AnimationType="RightToLeft"
                  Width="250"
                  Clipped="True"
                  VerticalAlignment="Bottom" />
        </Grid>

    </Grid>
</UserControl>